public class Main {
    public static void main(String[] args) {
        String str="abc";
        String str1="abc";
        String str2=new String("abc");
        String str3=new String("abc");
        System.out.println(str==str1);
        System.out.println(str2==str3);
    }
}